import request from '@/utils/request'

const commonPrefix = 'webApi/admin';

// 获取订单列表
export function fetchList(params) {
  return request({
    url: commonPrefix + '/order/list',
    method:'get',
    params:params
  })
}

// 批量发货
export function deliveryOrder(data) {
    return request({
      url: commonPrefix + '/order/update/delivery',
      method:'post',
      data:data
    });
  }


// 获取订单详情
export function getOrderDetail(id) {
    return request({
      url: commonPrefix + '/order/'+id,
      method:'get'
    });
}


// 关闭订单
export function closeOrder(params) {
  return request({
    url: commonPrefix + '/order/update/close',
    method:'post',
    params:params
  })
}
 
// 删除订单
export function deleteOrder(params) {
  return request({
    url: commonPrefix + '/order/delete',
    method:'post',
    params:params
  })
}
  
// 修改收货人信息
export function updateReceiverInfo(data) {
  return request({
    url: commonPrefix + '/order/update/receiverInfo',
    method:'post',
    data:data
  });
}
 
// 修改定额信息
export function updateMoneyInfo(data) {
  return request({
    url: commonPrefix + '/order/update/moneyInfo',
    method:'post',
    data:data
  });
}
 
// 修改备注信息
export function updateOrderNote(params) {
  return request({
    url: commonPrefix + '/order/update/note',
    method:'post',
    params:params
  })
}